package com.docker.login;

import com.docker.core.constant.MainConstant;
import com.docker.core.mvc.dao.BaseDao;
import com.jfinal.plugin.activerecord.Record;

import java.util.List;

/**
 * @Author ldl
 * @Create 2020/10/09 009 18:06
 */
public class LoginDao extends BaseDao {

    @Override
    protected String getDbName() {
        return MainConstant.DB_DOCKER;
    }

    @Override
    protected String getSqlTplNameSpace() {
        return "login";
    }

    public boolean exist(String account) {
        return tplQueryInt("exist", account) > 0;
    }

    public List<Record> inside(String account) {
        return tplList("user.inside", account);
    }

}
